package com.bkaka.service.impl;

import com.bkaka.dao.ExamPaperDao;
import com.bkaka.entity.ExamChapter;
import com.bkaka.entity.ExamPaper;
import com.bkaka.service.ExamPaperServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by maxiaoqiang on 2018/9/19.
 */

@Service
public class ExamPaperServerImpl implements ExamPaperServer {

    @Autowired
    private ExamPaperDao paperDao;

    @Override
    public List<ExamPaper> list(Integer userId) {
        return paperDao.list(userId);
    }

    @Override
    public List<ExamPaper> grade(Integer userId) {
        return paperDao.grade(userId);
    }

    @Override
    public ExamPaper findById(Integer paperId) {
        return paperDao.findById(paperId);
    }

    @Override
    public List<ExamPaper> findAll(Integer userId, Integer paperId, Integer subjectId) {
        return paperDao.findAll(userId, paperId, subjectId);
    }

    @Override
    public void create(ExamPaper paper) {
        paperDao.create(paper);
    }

    @Override
    public void update(ExamPaper paper) {
        paperDao.update(paper);
    }

    @Override
    public List<ExamPaper> countInit(Integer userId) {
        return paperDao.countInit(userId);
    }
}
